package mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import pojo.Brand;

import java.util.List;

/**
 * BrandMapper接口
 */
public interface BrandMapper {
    //查询所有品牌
    @ResultMap("brandBaseMap")
    @Select("SELECT * FROM t_brand")
    List<Brand> selectAll();

    //查询单个
    Brand selectById(int id);

//    //条件查询(status,brandName,companyName)
//    List<Brand> selectByCondition(@Param("status") int status,
//                                  @Param("brandName")String brandName,
//                                  @Param("companyName") String companyName);

    List<Brand> selectByCondition(Brand brand);


}
